<include file="Public:header" />
<style type="text/css">
	.left{width:330px;float:left;}
	.right{width:650px;float:right;}
	.scenic_title{width:400px;text-align:center;height:30px;line-height:30px;font-size:24px;font-weight:bold;}
	.scenic_node{width:100%;}
	.scenic_node h2{height:20px;line-height:20px;font-size:14px;width:94%;border-bottom:1px #999 solid;padding:0 10px;margin:10px auto;}
	.scenic_node p{text-indent:24px;color:#f00;}

#tbody {width:650px;margin:20px auto;text-align:left;}
#mainbody {width:640px;margin:5px;border:1px solid #222;padding:1px}
#mainphoto {cursor:pointer;display:block;}
#goleft {float:left;clear:left;margin:6px 5px 0 3px;}
#goright {float:right;clear:right;margin:6px 3px 0 5px;}
#photos {width:610px;height:54px;line-height:54px;border:1px solid #222;margin:10px 0;overflow:hidden;}
#showArea img {display:block;float:left;margin:1px 0;cursor:pointer;border:1px solid #222}
.txt_1 {font:bold 24px Verdana, Tahoma;color:#fff;}

</style>
<div id="content">
	<div class="left">
		<div class="scenic_title">{$scenic_info.name}</div>
		<div class="scenic_node">
			<h2>景点介绍</h2>
			<p>{$scenic_info.content|msubstr=0,120,'utf-8',false}</p>
		</div>
		<div class="scenic_node">
			<h2>最佳旅游时间</h2>
			<p>{$scenic_info.travel_time|msubstr=0,120,'utf-8',false}</p>
		</div>
		<div class="scenic_node">
			<h2>当地住宿</h2>
			<p>{$scenic_info.local_stay|msubstr=0,120,'utf-8',false} </p>
		</div>
		<div class="scenic_node">
			<h2>当地饮食</h2>
			<p>{$scenic_info.local_diet|msubstr=0,120,'utf-8',false} </p>
		</div>
	</div>

	<div class="right">
<div id="tbody">
<span class="txt_1">横向的JS相册效果</span>
    <div id="mainbody">
      <img src="/Public/Uploads/<php>echo $image_list[0];</php>" alt="旅游团" width="640" height="400" id="mainphoto" rel=src="/Public/Uploads/<php>echo $image_list[0];</php>" name="http://www.travel08.com" />
    </div>
    <img src="__PUBLIC__/images/goleft.gif" width="11" height="56" id="goleft" />
    <img src="__PUBLIC__/images/goright.gif" width="11" height="56" id="goright" />
    <div id="photos">
      <div id="showArea">
		<volist name="image_list" id="vo">
        <img src="/Public/Uploads/{$vo}" alt="" width="80" height="50" rel="/Public/Uploads/{$vo}" name="http://www.travel08.com" />
		</volist>
      </div>
    </div>
</div>


	</div>
<div style="clear:both"></div>


</div>
<script language="javascript" type="text/javascript">
var browse = window.navigator.appName.toLowerCase();
var MyMar;
var speed = 1; //速度，越大越慢
var spec = 1; //每次滚动的间距, 越大滚动越快
var minOpa = 50; //滤镜最小值
var maxOpa = 100; //滤镜最大值
var spa = 2; //缩略图区域补充数值
var w = 0;
spec = (browse.indexOf("microsoft") > -1) ? spec : ((browse.indexOf("opera") > -1) ? spec*10 : spec*20);
function get_id(e) {return document.getElementById(e);}
function goleft() {get_id('photos').scrollLeft -= spec;}
function goright() {get_id('photos').scrollLeft += spec;}
function setOpacity(e, n) {
    if (browse.indexOf("microsoft") > -1) e.style.filter = 'alpha(opacity=' + n + ')';
    else e.style.opacity = n/100;
}
get_id('goleft').style.cursor = 'pointer';
get_id('goright').style.cursor = 'pointer';
get_id('mainphoto').onmouseover = function() {/*setOpacity(this, maxOpa);*/}
get_id('mainphoto').onmouseout = function() {/*setOpacity(this, minOpa);*/}
get_id('mainphoto').onclick = function() {location = this.getAttribute('name');}
get_id('goleft').onmouseover = function() {this.src = '__PUBLIC__/images/goleft2.gif'; MyMar=setInterval(goleft, speed);}
get_id('goleft').onmouseout = function() {this.src = '__PUBLIC__/images/goleft.gif'; clearInterval(MyMar);}
get_id('goright').onmouseover = function() {this.src = '__PUBLIC__/images/goright2.gif'; MyMar=setInterval(goright,speed);}
get_id('goright').onmouseout = function() {this.src = '__PUBLIC__/images/goright.gif'; clearInterval(MyMar);}
window.onload = function() {
    //setOpacity(get_id('mainphoto'), minOpa);
    var rHtml = '';
    var p = get_id('showArea').getElementsByTagName('img');
    for (var i=0; i<p.length; i++) {
        w += parseInt(p[i].getAttribute('width')) + spa;
        //setOpacity(p[i], minOpa);
        p[i].onclick = function() {location = this.getAttribute('name');}
        p[i].onmouseover = function() {
            //setOpacity(this, maxOpa);
            get_id('mainphoto').src = this.getAttribute('rel');
            get_id('mainphoto').setAttribute('name', this.getAttribute('name'));
            //setOpacity(get_id('mainphoto'), maxOpa);
        }
        p[i].onmouseout = function() {
            //setOpacity(this, minOpa);
            //setOpacity(get_id('mainphoto'), minOpa);
        }
        rHtml += '<img src="' + p[i].getAttribute('rel') + '" width="0" height="0" alt="" />';
    }
    get_id('showArea').style.width = parseInt(w) + 'px';
    var rLoad = document.createElement("div");
    get_id('photos').appendChild(rLoad);
    rLoad.style.width = "1px";
    rLoad.style.height = "1px";
    rLoad.style.overflow = "hidden";
    rLoad.innerHTML = rHtml;
}
</script>
<include file="footer"/>